package com.wamke.handler;

import com.wamke.pojo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @program: wanke
 * @ClassName GlobaExceptionHandler
 * @author: WXK
 * @create: 2023-10-20 15:25
 **/
@RestControllerAdvice
@Slf4j
public class GlobaExceptionHandler {

    @ExceptionHandler(Exception.class)
    public Result ex(Exception t){

        t.printStackTrace();
        return Result.error("操作错误 如果你不太行的话 建议联系管理员 ");
    }
}
